package com.zoe.app.globalexception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.multipart.MaxUploadSizeExceededException;

/**
 * @author Zoe.Zhang
 * @date 2021/10/07
 * @description 全局异常处理
 */
@RestControllerAdvice
public class DynamicGlobalController {
    @ExceptionHandler(MaxUploadSizeExceededException.class)
    public String customException(MaxUploadSizeExceededException e) {
        return "上传文件大小超出限制";
    }
}
